package zsh.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import zsh.dao.IUserDao;

@Service
public class UserServiceImpl implements IUserService {

    private IUserDao userDao;
    @Autowired
    public void setUserDao(IUserDao userDao) {
        this.userDao = userDao;
    }

    @Value("peter")
    private String username;
    @Value("mary")
    private String password;

    @Value("${jdbc.username}")
    private String jdbcUsername;
    @Value("${jdbc.password}")
    private String jdbcPassword;


    @Override
    public void printText() {
        userDao.print();
        System.out.println(username);
        System.out.println(password);
        System.out.println(jdbcUsername);
        System.out.println(jdbcPassword);
    }
}
